export function useFadeInObserver(el) {
    const observer = new IntersectionObserver(
        (entries) => {
            entries.forEach((entry) => {
                if (entry.isIntersecting) {
                
                    el.classList.add('fade-in');
                    observer.unobserve(el); 
                }
            });
        },
        {
            threshold: 0.35,
        }
    );

    el._observer = observer; 
    observer.observe(el); 

    return () => {
        observer.unobserve(el);
    };
}